home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / python-support / python-rdflib / rdflib / StringInputSource.py < prev    next >
Encoding:
Python Source  |  2007-04-04  |  456 b   |  16 lines

  1. from urllib2 import urlopen, Request
  2.  
  3. from xml.sax.xmlreader import InputSource
  4.  
  5. from rdflib import __version__
  6. from StringIO import StringIO
  7.  
  8. class StringInputSource(InputSource, object):
  9.     def __init__(self, value, system_id=None):
  10.         super(StringInputSource, self).__init__(system_id)
  11.         stream = StringIO(value)
  12.         self.setByteStream(stream)
  13.         # TODO:
  14.         #   encoding = value.encoding
  15.         #   self.setEncoding(encoding)
  16.